home *** CD-ROM | disk | FTP | other *** search
/ Programming Languages Suite / ProgramD2.iso / Borland / Borland C++ For TASM / USRGUIDE.PAK / CASMLINK.ASM < prev    next >
Assembly Source File  |  1996-02-21  |  668b  |  26 lines

  1. ; Turbo Assembler example. Copyright (c) 1993 By Borland International, Inc.
  2. ;
  3. ; CASMLINK.ASM
  4. ;
  5. ; Usage: bcc link2asm.cpp casmlink.asm
  6. ;
  7. ; From the Turbo Assembler User's Guide, Ch. 18
  8.  
  9.         .MODEL  small
  10.         .DATA
  11.         EXTRN   _Flag:WORD
  12.         .CODE
  13.         PUBLIC  _ToggleFlag
  14. _ToggleFlag     PROC
  15.         cmp     [_Flag],0              ;is the flag reset?
  16.         jz      SetTheFlag             ;yes, set it
  17.         mov     [_Flag],0              ;no, reset it
  18.         jmp     short EndToggleFlag    ;done
  19. SetTheFlag:
  20.         mov     [_Flag],1              ;set flag
  21. EndToggleFlag:
  22.         ret
  23. _ToggleFlag     ENDP
  24.         END
  25.  
  26.